package pers.course.week11.ConvertData;

import java.io.*;

public class ConvertData {
    public static void main(String[] args) throws IOException {
        String str;
        char[] arr = new char[30];
        try {
            BufferedReader in = new BufferedReader(new FileReader("src/pers/course/week11/ConvertData/input.txt"));
            while ((str = in.readLine()) != null) {
                str = str.replaceAll("\\d", "");
                arr = str.toCharArray();
//                System.out.println(str);
            }
        } catch (IOException ignored) {
        }
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] >= 'A' && arr[i] <= 'Z') {
                arr[i] = (char) (arr[i] + 32);
            } else if (arr[i] >= 'a' && arr[i] <= 'z') {
                arr[i] = (char) (arr[i] - 32);
            }
        }
//        for (char c : arr) System.out.print(c);
        BufferedWriter out = new BufferedWriter(new FileWriter("src/pers/course/week11/ConvertData/output.txt"));
        StringBuilder sb = new StringBuilder();
        for (char c : arr) {
            sb.append(c);
        }
        String result = sb.toString();
        out.write(result);
        out.close();
    }
}
